#!/bin/bash
# Experimenting with variable scope
var_change() {
    local var1='local 1'

    echo -e "Inside function:\t var1=[$var1]\t \t var2=[$var2]"

    var1='changed again'
    var2='2 changed again'
}

var1='global 1'
var2='global 2'

echo -e "Before function call:\t var1=[$var1]\t var2=[$var2]"
var_change
echo -e "After function call:\t var1=[$var1]\t var2=[$var2]"
